package com.example.web;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/select")
public class selectDao {
    @Autowired
    StringRedisTemplate redisTemplate;

    @RequestMapping("/select")
    public String select(@RequestParam("selectneirou") String selectneirou) {
        redisTemplate.opsForValue().set("select",selectneirou );
        return "ok";

    }


    @RequestMapping("/getselectneirou")

    public String getselectneirou() {
        String selectneirou = redisTemplate.opsForValue().get("select");
        return selectneirou;
    }



}
